<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>五秒后跳转到电子时钟</title>
    <style>
        body {
            text-align: center;
            margin-top: 50px;
        }
        #countdown {
            font-size: 24px;
        }
    </style>
    <script>
        function startCountdown() {
            const countdownDisplay = document.getElementById('countdown');
            let timeLeft = 5;

            const countdown = setInterval(() => {
                if (timeLeft > 0) {
                    countdownDisplay.textContent = `正在倒计时: ${timeLeft} 秒后跳转到电子时钟`;
                    timeLeft--;
                } else {
                    clearInterval(countdown);
                    location.href = "./test01_电子时钟.html"; // 跳转到电子时钟页面
                }
            }, 1000);
        }

        // 页面加载完成后开始倒计时
        window.onload = function() {
            startCountdown();
        };
    </script>
</head>
<body>
    <div id="countdown">正在倒计时: 5 秒后跳转到电子时钟</div>
</body>
</html>